package com.lin.sms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lin.sms.domain.Score;
import com.lin.sms.domain.User;
import com.lin.sms.mapper.ScoreMapper;
import com.lin.sms.mapper.UserMapper;

@Service
public class TxService {

    @Autowired
    ScoreMapper scoreMapper;
    
    @Autowired
    UserMapper userMapper;
    
    public void saveServiceA(Score score,User user) {
      
        this.saveServiceB(user);
        scoreMapper.saveScore(score);
        Integer t = 1/0;
    }
    public void saveServiceB(User user) {
          
        userMapper.saveUser(user);
        //Integer t = 1/0;
    }
}
